package nml.mail.reg.smtp;

import nml.mail.reg.Reg;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class mail2world_com extends Reg {

	public void reg(String username, String password) {

		String url = "http://www.mail2world.com/reg/reg_step1.asp?bhcd2=1349970856";
		get(url);

		dr.findElement(By.name("user")).sendKeys(username);
		dr.findElement(By.name("pwd")).sendKeys(password);
		dr.findElement(By.name("repwd")).sendKeys(password);

		dr.findElement(By.name("pwdquestion")).sendKeys("City of birth?");
		dr.findElement(By.name("pwdans")).sendKeys("checkNow");

		dr.findElement(By.name("firstname")).sendKeys("TianMao");
		dr.findElement(By.name("lastname")).sendKeys("Taobao");

		dr.findElement(By.name("month")).sendKeys("May");
		dr.findElement(By.name("day")).sendKeys("21");
		dr.findElement(By.name("year")).sendKeys("1990");

		dr.findElement(By.name("gender")).click();

		dr.findElement(By.name("occupation")).sendKeys("Consulting");
		dr.findElement(By.name("state")).sendKeys("Colorado");
		dr.findElement(By.name("zip")).sendKeys("80011");

		dr.findElement(By.name("country")).sendKeys("United States");

		dr.findElement(By.name("ReferredByList")).sendKeys("Search Engine");
		dr.findElement(By.name("checkbox")).click();

		dr.findElement(By.name("securitycode")).click();

		System.out.println(username + "@mail2world.com");
	}

	public static void main(String[] args) {
		new mail2world_com().reg("qq331798654", "qq3131798654");
	}

}
